import java.util.Scanner;
public class Test {
    public static void main(String[] args) {
        //
    }
}




// 注意类名必须为 Main, 不要有任何 package xxx 信息
class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();//组数
            for(int i = 0; i < n; i++){
                int x = in.nextInt();
                int y = in.nextInt();

                int count = 0;//数组长度
                while(x>=10){//判断数组长度
                    x = x/10;
                    count++;
                }
                count++;
                int[] arr = new int[count];
                int num = x;
                while(num <= y){
                    for(int j = 0; j < count; j++){
                        for(int k = 0; k < j; k++){
                            int sign =
                        }
                    }
                }
            }
            int b = in.nextInt();
            System.out.println(a + b);
        }
    }
}
